package com.ceshiren.test.houduankaifa.confg;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;


@Configuration
public class JDBCConfig {


    @Value("${jdbc.driver}")
    private String driver;
    @Value("${jdbc.url}")
    private String url;
    @Value("${jdbc.username}")
    private String userName;
    @Value("${jdbc.password}")
    private String password;

    @Bean
    public HashMap<String,String> getDriver() {
        HashMap<String,String> hashMap = new HashMap<>();
        hashMap.put("jdbc.driver",driver);
        hashMap.put("jdbc.url",url);
        hashMap.put("jdbc.username",userName);
        hashMap.put("jdbc.password",password);
        return hashMap;
    }
}
